home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 151-175 / scopedisk168 / asmmacros / am_02 / deletefile.i < prev    next >
Text File  |  1995-03-19  |  1KB  |  37 lines

  1.      NOLIST
  2. DeleteFile     MACRO           ; 19 Dec 88
  3. *------------------------------; Start of DeleteFile macro.
  4.      NOLIST
  5.      IFC '\1','I'              ; If <PointerToFileName> is specified, then
  6.      LIST
  7.                                ; Put <PointerToFileName> in D1.
  8.      MOVE.L #\2,D1
  9.      NOLIST
  10.      IFEQ ReEntrant-1
  11.      LIST
  12.      ADD.L A5,D1
  13.      NOLIST
  14.      ENDC
  15.      ENDC
  16.      IFC '\1','D'              ; If <FileName> is specified, then
  17.      LIST
  18.                                ; Make D1 point to <FileName>.
  19.      MOVE.L #\2.str,D1
  20.      NOLIST
  21.      IFND \2.str               ; Unless it was previously defined,
  22.      LIST
  23.      SECTION DataSection,DATA  ; The ASCII <FileName> string goes here.
  24. \2.str:
  25.      DC.B '\2',0
  26.      CNOP 0,2
  27.      SECTION CodeSection,CODE
  28.      NOLIST
  29.      ENDC
  30.      ENDC
  31.      LIST
  32.      CallLib DeleteFile,dos    ; Call DeleteFile to delete the file.
  33.      TST.L D0                  ; Make the zero flag indicate failure.
  34. *------------------------------; End of DeleteFile macro.
  35.      ENDM
  36.      LIST
  37.